package com.caigou.mapper.cms;

import com.caigou.bean.cms.entity.SurveyFormStatistics;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Mapper
@Repository("SurveyStatisticsMapper")
public interface SurveyStatisticsMapper {
    int loadSurveyFormStatistics(@Param("formId") String formId);

    int saveSurveyFormStatistics(SurveyFormStatistics formStatistics);

    int updateSurveyFormStatistics(SurveyFormStatistics formStatistics);

    Integer loadCountByForm(@Param("formId") String formId, @Param("startTime") String startTime, @Param("endTime") String endTime);

    Integer loadCountByQuestion(@Param("questionId") Integer questionId, @Param("startTime") String startTime, @Param("endTime") String endTime);

    Integer loadCountByOption(@Param("questionId") Integer questionId, @Param("optionId") Integer optionId, @Param("startTime") String startTime, @Param("endTime") String endTime);
}
